package com.bmslz.monitor.base.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @Description: 告警规则
 * @Author: bobo
 * @Date:   2025-08-10
 * @Version: V1.0
 */
@Data
@TableName("m_alarm_model_rule")
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="m_alarm_model_rule对象", description="告警规则")
public class AlarmModelRule {
    
	/**id*/
	@TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
	private String id;
	/**告警模板编号*/
	@ApiModelProperty(value = "告警模板编号")
	private String alarmModelNo;
	/**告警模板id*/
	@ApiModelProperty(value = "告警模板id")
	private String alarmModelId;
	/**规则编号*/
    @ApiModelProperty(value = "规则编号")
	private String ruleNo;
	/**1 紧急 2 告警 3 预警*/
    @ApiModelProperty(value = "1 紧急 2 告警 3 预警")
	private String grade;
	/**测点key*/
    @ApiModelProperty(value = "测点key")
	private String attKey;
	/**测点key的数据类型 1数值 2日期yyyy-MM-dd 3 日期yyyy-MM-dd HH:mm:ss*/
    @ApiModelProperty(value = "测点key的数据类型 1数值 2日期yyyy-MM-dd 3 日期yyyy-MM-dd HH:mm:ss")
	private String attKeyType;
	/**1 > ,2>=,3=,4<,5<=*/
    @ApiModelProperty(value = "1 > ,2>=,3=,4<,5<=")
	private String conditionTag;
	/**告警阈值*/
    @ApiModelProperty(value = "告警阈值")
	private String dataValue;
	/**静默时间 分钟*/
    @ApiModelProperty(value = "静默时间 分钟")
	private Integer silenceTime;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
	private Date updateTime;
	/**删除状态（0，正常，1已删除）*/
    @ApiModelProperty(value = "删除状态（0，正常，1已删除）")
	@TableLogic
	private String delFlag;
}
